const {defineConfig} = require('@vue/cli-service')

const {sentryWebpackPlugin} = require("@sentry/webpack-plugin");

module.exports = defineConfig({
    transpileDependencies: true,
    configureWebpack: config => {
        console.log('process.env.NODE_ENV ',process.env.NODE_ENV )
        console.log('process.env.SENTRY_AUTH_TOKEN ',process.env.SENTRY_AUTH_TOKEN )
        if (process.env.NODE_ENV === 'production') {
            // 在生产环境下加载指定插件
            config.plugins.push(sentryWebpackPlugin({
                    url: 'http://192.168.1.10:9000',
                    org: "sentry",
                    project: "javascript-vue",
                    authToken: process.env.SENTRY_AUTH_TOKEN,
                }))
        }
    }
})
